<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/basicdata/Bas_Toolings.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/basicdata/Bas_Toolings.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name:'Bas_Toolings',
        setup() {
            const table = ref({
                key: "ToolingId",
                footer: "Foots",
                cnName: "工治具台账",
                name: "basicdata/Bas_Toolings",
                newTabEdit: false,
                url: "/Bas_Toolings/",
                sortName: "ToolingId"
            });
            const editFormFields = ref({"ToolingTypeId":[],"Enabled":"","ToolingCode":"","ToolingName":"","ToolingDesc":"","ToolingPicture":"","ToolingStatus":"","PlantId":"","WorkshopId":"","PurchaseDate":"","AssetNo":"","AssetDate":"","AssetStatus":"","VendorId":"","Manufacture":"","EntranceDate":"","CertificateDate":"","CertificateResult":"","Remarks":""});
            const editFormOptions = ref([[{"title":"是否启用","field":"Enabled","type":"switch"},
                               {"dataKey":"BASE_ToolingTypeList","data":[],"title":"工治具类型Id","field":"ToolingTypeId","type":"cascader"}],
                              [{"title":"工治具编码","required":true,"field":"ToolingCode"},
                               {"title":"工治具名称","required":true,"field":"ToolingName","type":"text"}],
                              [{"title":"工治具描述","field":"ToolingDesc","type":"textarea"},
                               {"title":"工治具图片","field":"ToolingPicture","type":"img"}],
                              [{"dataKey":"restatus","data":[],"title":"工治具状态","field":"ToolingStatus","type":"select"},
                               {"dataKey":"BASE_Plant","data":[],"title":"归属工厂","field":"PlantId","type":"select"}],
                              [{"dataKey":"BASE_Workshop","data":[],"title":"归属车间","field":"WorkshopId","type":"select"},
                               {"title":"采购时间","field":"PurchaseDate"}],
                              [{"title":"资产编号","field":"AssetNo"},
                               {"title":"入资时间","field":"AssetDate"}],
                              [{"title":"资产状态","field":"AssetStatus","type":"number"},
                               {"title":"供应商id","field":"VendorId","type":"number"}],
                              [{"title":"制造商","field":"Manufacture"},
                               {"title":"入场时间","field":"EntranceDate"}],
                              [{"title":"验收时间","field":"CertificateDate"},
                               {"title":"验收结果","field":"CertificateResult"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"ToolingTypeId":[],"ToolingCode":"","ToolingName":"","ToolingStatus":"","PlantId":"","WorkshopId":""});
            const searchFormOptions = ref([[{"dataKey":"BASE_ToolingTypeList","data":[],"title":"工治具类型Id","field":"ToolingTypeId","type":"cascader"},{"title":"工治具编码","field":"ToolingCode","type":"like"},{"title":"工治具名称","field":"ToolingName","type":"like"}],[{"dataKey":"BASE_Plant","data":[],"title":"归属工厂","field":"PlantId","type":"select"},{"dataKey":"BASE_Workshop","data":[],"title":"归属车间","field":"WorkshopId","type":"select"},{"dataKey":"restatus","data":[],"title":"工治具状态","field":"ToolingStatus","type":"select"}]]);
            const columns = ref([{field:"ToolingTypeId",title:"工治具类型Id",type:"bigint",bind:{ key:"BASE_ToolingTypeList",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingId",title:"工治具ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingCode",title:"工治具编码",type:"string",link:true,sort:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingName",title:"工治具名称",type:"string",sort:true,width:150,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingDesc",title:"工治具描述",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingPicture",title:"工治具图片",type:"img",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"ToolingStatus",title:"工治具状态",type:"int",bind:{ key:"restatus",data:[]},sort:true,width:110,showOverflowTooltip:true,align:"left"},
                       {field:"PlantId",title:"归属工厂",type:"bigint",bind:{ key:"BASE_Plant",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"WorkshopId",title:"归属车间",type:"bigint",bind:{ key:"BASE_Workshop",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"PurchaseDate",title:"采购时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"AssetNo",title:"资产编号",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"AssetDate",title:"入资时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"AssetStatus",title:"资产状态",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"VendorId",title:"供应商id",type:"bigint",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Manufacture",title:"制造商",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"EntranceDate",title:"入场时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CertificateDate",title:"验收时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CertificateResult",title:"验收结果",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"是否启用",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
